package com.sheep.log;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.bridge.SLF4JBridgeHandler;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.logging.Logger;


/**
 * 什么都不加启动spring
 *
 * @author 第七人格
 * @date 2023/04/16
 */
@Slf4j
public class AllLogToBackLog {

    public static void main(String[] args) {
        Logger logger = Logger.getLogger(String.valueOf(JucLog.class));
        SLF4JBridgeHandler.removeHandlersForRootLogger();
        SLF4JBridgeHandler.install();
        logger.info("我是juc在项目中打印的日志");


        Logger log4j2 = Logger.getLogger ( AllLogToBackLog.class.getName () );
        log4j2.info("我是log4j2在项目中打印的日志");

        AnnotationConfigApplicationContext
                context = new AnnotationConfigApplicationContext();
        context.refresh();

        log.info("我是logback在项目中打印的日志");
    }
}
